package com.designType.stateType;

public class CancelledState implements OrderState {
    @Override
    public void ship(OrderContext context) {
        throw new UnsupportedOperationException("已取消订单不能发货");
    }

    @Override
    public void receive(OrderContext context) {
        throw new UnsupportedOperationException("已取消状态不能收货操作");
    }

    @Override
    public void cancel(OrderContext context) {
        System.out.println("订单已取消");
    }

    @Override
    public void pay(OrderContext context) {
        throw new UnsupportedOperationException("已取消状态不能支付");
    }
}